//
//  UIViewController+PushPop.m
//  MyFrameWork
//
//  Created by eason on 16/4/21.
//  Copyright © 2016年 普惠. All rights reserved.
//

#import "UIViewController+PushPop.h"

@implementation UIViewController (PushPop)

- (void)pushToViewController:(UIViewController *)controller animated:(BOOL)animated
{
    if (self.navigationController.viewControllers.count >= 1) {
        controller.hidesBottomBarWhenPushed = YES;
    }else{
        controller.hidesBottomBarWhenPushed = NO;
    }
    [self.navigationController pushViewController:controller animated:animated];
}

@end
